package com.ygqh.baby.service;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.ao.ResultSet;
import com.ygqh.baby.model.YgUserCultivationDayModel;
import com.ygqh.baby.model.YgUserCultivationOrderPrice;
import com.ygqh.baby.po.YgUser;
import com.ygqh.baby.po.YgUserCultivationDay;

public interface YgUserCultivationDayService {

	List<YgUserCultivationDay> find();

	int findCount();

	YgUserCultivationDay findById(Long id);

	int deleteSoft(Long[] ids);

	int deleteSoft(Long id);

	int save(YgUserCultivationDay ygUserCultivationDay);

	int update(YgUserCultivationDay ygUserCultivationDay);

	int saveOrUpdate(YgUserCultivationDay ygUserCultivationDay);

	ResultSet<YgUserCultivationDay> search(QueryInfo queryInfo, String q);

	List<YgUser> queryAffiliateUser();

	List<YgUserCultivationOrderPrice> findOrderPriceByDay(String yesterday);

	List<YgUserCultivationOrderPrice> findReturnPriceByDay(String yesterday);

	List<YgUserCultivationDay> findUserCultivationByUserId(Long id);

	List<YgUserCultivationDayModel> queryUserCultivationGroupByUserId(Long userId);

	ResultSet<YgUserCultivationDayModel> findUserCultivationSumGroupByMonth(Long userId);

	List<YgUserCultivationDay> affiliateUserReportV2(Date startDate, Date endDate, Long userId);

	int addBatch(List<YgUserCultivationDay> list);

	List<YgUserCultivationDay> findByDay(Date startDate, Date endDate);

	BigDecimal findUserCultivationSumByUserId(Long userId);

	BigDecimal getUserShareOrderPrice(YgUser ygUser, Date startDate, Date endDate);

	int additional(List<YgUserCultivationDay> otherDayCultivation);

	/**
	 * 
	* @Title: getSumGroupByUserId 
	* @Description: 获取该时间区间的各金额之和 （注：该时间区间为前后都包含）
	* @param start 
	* @param end 
	* @return List<YgUserCultivationDay>    返回类型
	* @author （guohao） 
	* @throws
	* @date 2018年2月1日 上午10:38:49 
	* @version V1.0
	 */
	List<YgUserCultivationDay> getSumGroupByUserId(Date start, Date end);

	List<YgUserCultivationDay> getSumGroupByMonth(Date start, Date end, Long userId);

	List<YgUserCultivationDay> findByUserIdAndDay(Date startDate, Date endDate, Long userId);

}
